package com.ruoyi.questionBank.enums;

public enum BankTypeEnum {
    /** 考核*/
    EXAM(0),
    /** 测试*/
    TEST(1),
    ;
    private int type;

    BankTypeEnum(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static BankTypeEnum parse(int type) {
        for (BankTypeEnum typeEnum : BankTypeEnum.values()) {
            if (typeEnum.getType() == type) {
                return typeEnum;
            }
        }
        throw new IllegalArgumentException("Bank type undefined[" + type + "]");
    }
}
